﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using HA.ModFlow.Domain.DomainLayer;
using System.Windows.Controls;



namespace HA.ModFlow.Application
{
    public class HANIFlowVM:MDTVIViewModel
    {

          public HANIFlowVM(MDTVIViewModel parent, LPFData lpf)
           : base(parent, false)
       {


           this._contextMenu = new ContextMenu();

           MenuItem mi = new MenuItem();

           mi.Header = "属性";

           mi.Command = ModflowV2Commands.EditHani;

           this._contextMenu.Items.Add(mi);




           this._imageSource = VMImageSource.dataset;


           this._isShowCheck = false;





           this._lpf = lpf;
       }


       public override string Desc
       {
           get
           {
               return "水平异质性";
           }
       }

       public override System.Windows.Input.ICommand DoubleClickCommand
       {
           get
           {
               return ModflowV2Commands.EditHani;
           }
       }

       LPFData _lpf;



       protected override void OnSelectedChanged()
       {

           if (this.IsSelected)
           {
               if (ProjectService.DefaultService.Project.CurentFlowVectorData != null)
               {
                   ProjectService.DefaultService.Project.CurentFlowVectorData = null;
               }
               if (ProjectService.DefaultService.Project.CurrentDSGrid != null)
               {
                   ProjectService.DefaultService.Project.CurrentDSGrid = null;
               }

               ProjectService.DefaultService.Project.CurrentDSData = this._lpf.Hani;
               UIModule.DefaultModule.RibbonV2ViewModel.ViewOpViewModel.ToolVM.CurrentTool = APPTOOLMODE.GRID3D;
           }
           
           
       }


    }
}
